#ifndef _STRAWGUI_DRAW_STACK_H_
#define _STRAWGUI_DRAW_STACK_H_

#include "sDrawContext.h"
#include "sDrawSurface.h"
#include <stack>

namespace sgui
{
	class sGUI;
namespace engine
{

class sDrawStack
{
private:
	std::stack<const sDrawContext*>	m_stack;
	sGUI&							m_gui;
	sDrawSurface&					m_surface;
public:
	inline sGUI&				getGui() { return m_gui; }
	inline sDrawSurface&		getSurface() { return m_surface; }
	bool push(const sDrawContext* context);
	void pop(bool deleteContext = false);
	inline const sDrawContext* top() { if (m_stack.empty()) return NULL; return m_stack.top(); }

	sDrawStack(sGUI& gui, sDrawSurface& surface);
};

};
};

#endif